//
//  WifiHeader.h
//  Wifi
//
//  Created by srulos on 2017/6/9.
//  Copyright © 2017年 srulos. All rights reserved.
//

#ifndef WifiHeader_h
#define WifiHeader_h

#import "LoginHeader.h"
#import "Util.h"
#import "MJRefresh.h"
#import "LongImageView.h"
#import "MJNavigationController.h"

#define kStatusBarTappedNotification @"statusBarTappedNotification"

#define VC_INIT_WITH_NIB_NAME(class_name)\
class_name * vc = [[class_name alloc]initWithNibName:@#class_name bundle:nil];

#define VC_INIT_WITH_NIB_NAME_VC_NAME(class_name,vc_name)\
class_name * vc_name = [[class_name alloc]initWithNibName:@#class_name bundle:nil];

#define VC_INIT_NC_WITH_NIB_NAME_VC_NAME(class_name,vc_name,nc_name)\
class_name * vc_name = [[class_name alloc]initWithNibName:@#class_name bundle:nil];\
MJNavigationController * nc_name = [[MJNavigationController alloc]initWithRootViewController:vc_name];

#define VIEW_INIT_NIB(class_name)\
[[[NSBundle mainBundle] loadNibNamed:@#class_name owner:self options:nil] lastObject];

#define VIEW_INIT_NIB_NAME(class_name,view_name)\
class_name * view_name = [[[NSBundle mainBundle] loadNibNamed:@#class_name owner:self options:nil] lastObject];

#define CREATE_BORDER_EXTEND(view,radius,width,r,g,b,a)\
view.layer.cornerRadius = radius;\
view.layer.borderWidth = width;\
view.layer.borderColor = [UIColor colorWithRed:r / 255.0 green:g / 255.0 blue:b / 255.0 alpha:a].CGColor;

#define ALERT_VIEW(_title,_message) [[[UIAlertView alloc] initWithTitle:_title message:_message delegate:nil cancelButtonTitle:K_NSLOCAL(@"OK") otherButtonTitles:nil] show];

#define MAIN_COLOR [UIColor colorWithRed:35 / 255.0 green:150 / 255.0 blue:255 / 255.0 alpha:1]

#define K_NSLOCAL(str) NSLocalizedStringFromTable(str, @"InfoPlist", nil)

#define GOOGLE_AD_ID @"ca-app-pub-4634576436183649/7582256611"
#define CY_GOOGLE_AD_ID @"ca-app-pub-4634576436183649/3635335419"


#define KSCREEN_WIDTH [[UIScreen mainScreen] bounds].size.width

#endif /* WifiHeader_h */
